<?php
include_once("../../php/include_all.php");

echo"
<form class='form-horizontal' id='prokeg'>
                            <div class='control-group'>
                                <label class='control-label' for='cari'>Cari Program</label>
                                <div class='controls'>
                                    <input type='text' id='cari' class='input-medium' name='cari'>
                                    <a class='btn btn-primary cariPro'><div id='loader' style='margin-top:2px'></div>Cari</a>
                                </div>
                            </div>
                            <div>
                                <h5>Program Lainnya</h5>
                            </div>

                            <table class='table table-hover'>
                                <tbody id='program' name='program'> 
								";
                                
                                    $program = get_datas("select * from mus_program");
                                    foreach ($program as $program) {
                                        $as = (($program['id_program'] % 2) == 0)?'#FCFDFF':'#C7E7FC';
                                        ?> 	<tr bgcolor="<?php echo $as;?>"><td>
                                                <div class="item_prog_<?php echo $program['id_program'] ?>">
                                                    <input type='radio' onclick="getData(<?php echo $program['id_program'] ?>)" name='optionsRadiosPro' id="optionsRadiosPro_<?php echo $program['id_program'] ?>" value="<?php echo $program['id_program'] ?>">
                                                    <?php echo $program['nama_program'] ?>
                                                    <div class='list_keg'></div>
                                                </div>
                                            </td>                                       
                                        </tr> 
                                    <?php  }
                                    ?>
                             </tbody>
                            </table>
                        </form>
<script>
$('.cariPro').click(function(){
	var pro = $('#cari').val();
	source = "cari.php?pro=" + pro;
	var cobapro = $.get(source);
	cobapro.done(function(data){
		$('#program').html(data);
	});
});

</script>